package edu.java.water.service.impl;

import edu.java.water.entity.ProductNormEntity;
import edu.java.water.mapper.ProductNormMapper;
import edu.java.water.service.ProductNormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ProductNormServiceImpl implements ProductNormService {
    @Autowired
    private ProductNormMapper productNormMapper;
    @Override
    public List<ProductNormEntity> selectProductNorm() {
        return productNormMapper.selectProductNorm();
    }

    @Override
    public List<ProductNormEntity> searchProductNorm(String search) {
        search = "%"+search.replaceAll(" ","%")+"%";
        return productNormMapper.searchProductNorm(search);
    }
}
